﻿<!DOCTYPE html>
<!--机械移动式起重机外观检查表编辑-->
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

    <style>

        body {
            padding-bottom: 10px;
        }

        .el-col {
            padding: 10px;
            font-size: 14px;
        }

        td {
            padding: 0 10px;
            font-size: 14px;
        }

        .el-form-item {
            margin-bottom: 0px !important;
        }

        .el-input-group__prepend {
            color: #000;
            font-size: 14px;
        }

        .el-input__inner {
            color: #606266;
            font-size: 14px;
            margin-top: -5px\0 !important;
        }

        .el-input-group__prepend {
            padding-left: 0
        }

        .el-input--mini .el-input__inner {
            height: 20px;
            line-height: 28px;
        }
    </style>
</head>
<body>
    
<div id="app" v-cloak>   
        <div style="width:100%;text-align:center ">
            <label style="font-weight:bold">机械移动式起重机外观检查表</label>
        </div>
        <div style="width:100%;text-align:right ">
            <label>编号:{{Form.CheckNo}}</label>
        </div>

        <el-form :model="Form" status-icon style="margin-top:5px;width:100%" class="safeCard">
            <el-row style="border:1px  solid; ">
                <el-col :span="24">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input type="text" v-model="Form.NumberPlate" autocomplete="off" size="mini">
                                <template slot="prepend">
                                    {{MechanicalMobileCraneAppearanceCheck.NumberPlate+mark.m}}
                                </template>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
            </el-row>
            <el-row style="border:1px  solid; border-top:0px ">
                <el-col :span="12">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input size="mini">
                                <template slot="prepend">
                                    <div>{{MechanicalMobileCraneAppearanceCheck.Checker+mark.m}}</div>
                                </template>
                                <el-select @visible-change="visibleChange" v-model="Form.Checker" slot="suffix" :placeholder="MechanicalMobileCraneAppearanceCheck.Checker">
                                    <el-option label="请选择" value=""></el-option>
                                    <el-option v-for="item in Checker" :label="item.value" :value="item.key">
                                    </el-option>
                                </el-select>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
                <el-col :span="12">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input type="text" v-model="Form.HoistingCommanderNumber" autocomplete="off" size="mini">
                                <template slot="prepend">
                                    {{MechanicalMobileCraneAppearanceCheck.HoistingCommanderNumber+mark.m}}
                                </template>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
            </el-row>

            <el-row style="border:1px  solid;border-top:0px; text-align:center">
                <el-col span="6" style="border:1px  solid;border-top:0px;border-left:0px;border-bottom:0px; text-align:center">
                    <label>{{MechanicalMobileCraneAppearanceCheck.CheckContent}}</label>
                </el-col>
                <el-col span="18">
                    <label>{{MechanicalMobileCraneAppearanceCheck.CheckResult}}</label>
                </el-col>
            </el-row>

            <el-row style="border:1px  solid; border-top:0px;    ">
                <el-col :span="8" style="text-align:center">
                    {{MechanicalMobileCraneAppearanceCheck.WalkingDevice}}
                </el-col>
                <el-col :span="8" style="border:1px  solid;border-top:0px;border-bottom:0px; text-align:center">
                    {{MechanicalMobileCraneAppearanceCheck.IsCheckResult}}
                </el-col>
                <el-col :span="8" style="text-align:center">
                    {{MechanicalMobileCraneAppearanceCheck.Problem}}
                    
                </el-col>
            </el-row>
            <div v-for="todo in Form.CheckItemListOne">
                <el-row style="border:1px  solid; border-top:0px;    ">
                    <el-col :span="8" style=" height:40px;text-align:center">
                        {{todo.CheckName}}
                    </el-col>
                    <el-col :span="8" style="border:1px  solid;border-top:0px;border-bottom:0px;text-align:center;height:40px">
                        <el-form-item>
                            <template>
                                <el-checkbox v-model="todo.checkResult"></el-checkbox>
                            </template>
                        </el-form-item>
                    </el-col>
                    <el-col :span="8" style="height: 40px">
                        <el-form-item>
                            <el-input type="text" v-model="todo.Problem" autocomplete="off" size="mini">
                            </el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
            </div>

            <el-row style="border:1px  solid; border-top:0px;    ">
                <el-col :span="8" style="text-align:center">
                    {{MechanicalMobileCraneAppearanceCheck.Crane}}
                </el-col>
                <el-col :span="8" style="border:1px  solid;border-top:0px;border-bottom:0px; text-align:center">
                    {{MechanicalMobileCraneAppearanceCheck.IsCheckResult}}
                </el-col>
                <el-col :span="8" style="text-align:center">
                    {{MechanicalMobileCraneAppearanceCheck.Problem}}
                </el-col>
            </el-row>

            <div v-for="todo in Form.CheckItemListTwo">
                <el-row style="border:1px  solid; border-top:0px;    ">
                    <el-col :span="8" style="text-align:center">
                        {{todo.CheckName}}
                    </el-col>
                    <el-col :span="8" style="border:1px  solid;border-top:0px;border-bottom:0px;text-align:center;height:40px">
                        <el-form-item>
                            <template>
                                <el-checkbox v-model="todo.checkResult"></el-checkbox>
                            </template>
                        </el-form-item>
                    </el-col>
                    <el-col :span="8" style="height: 40px">
                        <el-form-item>
                            <el-input type="text" v-model="todo.Problem" autocomplete="off" size="mini">
                            </el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
            </div>

            <el-row style="border:1px  solid; border-top:0px ">
                <el-form-item :label="MechanicalMobileCraneAppearanceCheck.InConclusion+mark.m" prop="InConclusion" class="inputTextarea">
                    <!-- 弹出页的其它不能成组的控件添加class="inputTextarea"，达到label与input、select等控件的label对齐的目的 -->
                    <el-input type="textarea" v-model="Form.InConclusion" autocomplete="off"></el-input>
                </el-form-item>
            </el-row>
            <el-row>
                <el-form-item style="text-align:center; padding-top:5px">
                    <el-button type="primary" @click="parent.ListItem.dialogVisible=false">{{col.btnBack}}</el-button>
                </el-form-item>
            </el-row>
        </el-form>
        <el-dialog title="" :visible.sync="ListItem.dialogVisible" width="90%" height="95%" top="10vh">
            <iframe ref="iframe" :src="ListItem.InputUrl" style="height:95%;width:100%" frameborder="0"></iframe>
        </el-dialog>
    </div>
    <script type="text/javascript">
        app = new Vue({
            el: '#app',
            data: {
                id: '',
                Form: {
                    id: guidEmpty,
                    Checker: '',//"检查人",
                    CheckDate: '',//"时间",
                    CheckNo: '',//"编号",
                    WireRopeStatic: '',// "状态",
                    NumberPlate: '',// "车牌号",
                    HoistingCommanderNumber: '',// "吊装指挥人及特殊工种作业证号",
                    CheckContent: '',// "检查内容",
                    CheckResult: '',// "检查结果",
                    WalkingDevice: '',// "行走装置",
                    IsCheckResult: '',//"检查结果合格√，不合格不选即可",
                    Problem: '',//"问题",
                    UseUnit: '',//"使用单位",
                    WorkingArea: '',// "作业区域",
                    CheckItemListOne:[],
                    CheckItemListTwo: [],
                 
                    InConclusion: '',// "结论",
                },
                TerritorialDepartment: [],
                IsDevelopSafetyPlan: [],
                WorkingArea: [],
                Checker: [],
                rules: {},
                BasedDatabaseManagementRequirements: [],
                ListItem: ListItem,
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                handleNodeClick: function (data) {
                    console.log(data);
                },
                handleChange: function (value) {
                    console.log(value);
                },
                handleChecked: function (value) {
                },
                handleCheckedConfirmation: function (value) {
                },
                deleteRow: function (index, rows) {
                    rows.splice(index, 1);
                },
                getData: function () {
                    getDataAdd(this, '/api/MechanicalMobileCraneAppearanceCheck/get?id=' + this.id);
                },
               
                //提交数据
                onSubmitForm: function (formName) {
                    var mythis = this;
                    //this.$refs[formName].validate(function (valid) {
                    //    //验证通过
                    //    if (valid) {
                    onSubmitForm(this, '/api/MechanicalMobileCraneAppearanceCheck/Save', mythis.Form);
                    //} else {
                    //    //验证失败
                    //    return false;
                    //}
                    //});
                },
            },
            mounted: function () {
                var list = getDicDataArray(['08', '50', '97', '09']);
                this.TerritorialDepartment = getDicDatafromArray('08', list);
                this.IsDevelopSafetyPlan = getDicDatafromArray('50', list);//工作类型
                this.WorkingArea = getDicDatafromArray('97', list);//
                this.Checker = getDicDatafromArray("09", list);//批准人
                this.id = getUrlParam("id");
                this.getData();
            
            }
        });
    </script>
</body>
</html>